#include "System.h"
#include "DS1307RTC.h"

DS1307RTC RTC = DS1307RTC(); // create an instance for the user

time_t predefinedTime = 0;

DS1307RTC::DS1307RTC() {
}

time_t DS1307RTC::get() {
    if (predefinedTime != 0) {
        return predefinedTime;
    }
    return (time_t) (current_timestamp() / 1000);
}

bool DS1307RTC::set(time_t t) {
    predefinedTime = t;
    return true;
}

bool DS1307RTC::read(tmElements_t &tm) {
    return false;
}

bool DS1307RTC::write(tmElements_t &tm) {
    return false;
}

bool DS1307RTC::chipPresent() {
    return true;
}
